
#拷贝文件或目录路径
import os
import subprocess

def Main():
  ArgOfFilePath=__import__("sys").argv[1]
  FileName=os.path.basename(ArgOfFilePath)
  CMD = "echo " + ArgOfFilePath + "| clip"
  # 使用subprocess运行命令，将stdout和stderr重定向到PIPE以捕获输出
  process = subprocess.Popen(CMD, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

Main()